package com.yy.tech.data.annotation;

import com.yy.tech.data.coder.decode.Decoder;
import com.yy.tech.data.coder.encode.Encoder;

import java.lang.annotation.*;

/**
 * @author yy
 * @date 2022/4/4
 * @description: TODO
 */
@Target({ElementType.METHOD,ElementType.FIELD})
@Retention(RetentionPolicy.RUNTIME)
@Documented
public @interface SecretProperty {

    /**
     * encoder name
     * @return
     */
    String encoder() default "";

    /**
     * encoder class
     * @return
     */
    Class<? extends Encoder> encoderClass() default Encoder.class;

    /**
     * decoder name，Used first。
     * @return
     */
    String decoder() default "";

    /**
     * decoder class,if name empty and decoder class is not `Converter.class`
     * @return
     */
    Class<? extends Decoder> decoderClass() default Decoder.class;
}
